package com.moson.girl.exception;

import com.moson.girl.enums.ResultEnum;

/**
 * 自定义异常
 * runtimeException:会有事务回滚
 * @Author: MoXingjian
 * @Description:
 * @Date: Created in 20:20 2018/1/28
 * @Modified By:
 */
public class GirlException extends RuntimeException{

    private Integer code;

    //自定义构造方法
    public GirlException(ResultEnum resultEnum) {
        super(resultEnum.getMsg());
        this.code = resultEnum.getCode();
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }
}
